﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Tormenta.Utils.Menu
{
    public class MenuBase: DrawableGameComponent
    {
        public MenuBase(Game game): base(game)
        {
        }

        public List<MenuItemBase> Items { get; set; }

        public Vector2 Position { get; set; }

        public override void Draw(GameTime gameTime)
        {
            base.Draw(gameTime);

            SpriteBatch spriteBatch = this.Game.Services.GetService(typeof(SpriteBatch)) as SpriteBatch;
            foreach (MenuItemBase item in this.Items)
            {
                item.Draw(spriteBatch, this.Position);
            }
        }
    }
}
